package com.orcamento.security;

import java.security.MessageDigest;

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;

public class Encrypter {
	
	private static final String SALT = "[&AI0I3J&+}";
	
	public static String password( String password ) {
		password = SALT + password;
		MessageDigest messageDigest = DigestUtils.getSha256Digest();
		byte[] digest = messageDigest.digest( password.getBytes() );
		return Hex.encodeHexString( digest );
	}
	
}
